home *** CD-ROM | disk | FTP | other *** search
Text File | 1987-01-13 | 27.1 KB | 779 lines | [TEXT/ttxt] |
- WWIVMOD1.TXT
-
- Copyright (c) 1986, Mark Pinkstone. May be distributed freely, with the sole
- exception that the file may NOT be posted to a CompuServe software library
- (where subsequent distribution would be prohibited by the CIS "media
- copyright").
-
- Additional cautions...
- ----------------------
- These modifications are provided as tools for the individual WWIV SysOp ONLY!
- Public distribution of the resultant modified WWIV source code, or posting
- and distribution of a compiled and modified version of WWIV is prohibited by
- WWIV's copyright. Respect the original author's skills - change the programs
- for YOUR use only!
-
- Authors' and Editor's Disclaimer
- --------------------------------
- Although these modifications have been repeatedly tested on a number of
- different systems, there can be no way to insure that what you do with them
- will yield the same result. As such, these changes come with no warranty of
- any kind, either expressed or implied.
-
- Preface
- --------
- With Wayne Bell's release of WWIV, an unusual step was taken - NO executable
- version of the program was made available - only the Turbo Pascal source code
- was provided as "shareware".
-
- With this source available, a number of devoted (and crazy) WWIV SysOps took
- the necessary time to examine the source code, and modify it for their own
- systems ("...oh, Vanity, Vanity...thy name is SysOp"), adding personal touches
- and features not found in the original, while at the same time, deleting or
- rewriting some of the code to eliminate confusion.
-
- This is the first compilation and explanation of those changes. What you
- will see in the pages below are concise (and a tad irreverant) descriptions
- of the changes, the intended purpose of the changes, and the changes them-
- selves, shown in context with some of the original WWIV source code. ALL
- of these changes have been thouroughly tested prior to their inclusion in
- this document, so if you make the changes, they're likely to work!
-
- I tip my hat to Wayne Bell, for having the courage to distribute his work,
- rather than just its results. In addition, the following individuals deserve
- prominent mention for their investments of time, jangled nerves, extreme
- patience under pressure, and horrendous telephone bills in helpine me make
- these WWIV changes available to all:
-
- Dennis Raney, SysOp of The Programmers Exchange
- (816) 228-1957
-
- Richard Douglas, SysOp of BEFCOP BBS
- (713) 781-9285
-
- Finally, this set of modifications surely is but the "tip of the iceberg".
- If you have made some changes to WWIV that you wish to share with us, please
- do! Contact me by any of the following methods:
-
- On GEnie, you can find me in the BBS RoundTable, or send GEmail to PINKSTONE;
-
- On MCI Mail, use the address MPINKSTONE;
-
- Sign on to LEX-PC, at (215) 569-6975, 24 hours a day, 2400 baud and less,
- where I'm the SysOp.
-
- Mark Pinkstone
- November 10, 1986
-
- =============================================================================
- NOTE: The text comments have been written with a right text margin of 80,
- but the Pascal source code is displayed with a right margin of 127
- in order to preserve the format of the original code.
- =============================================================================
-
- ANSI graphics display to remote caller
- Author: Dennis Raney
- --------------------
-
- This will help you add the graphics to your program. You can add
- ANSI graphics, but Turbo will not display them correctly on your screen.
- They will come out correct on the receiving end, provided that the user is
- capable of receiving ANSI graphics and high-order ASCII characters. To
- eliminate the problem with the local display, you must install a screen
- writing routine that uses the normal DOS i/o calls (which can be intercepted
- by the ANSI driver). This has the negative effect of significantly slowing down
- local screen displays. It may be best to test your ANSI from remote, and
- avoid the "slowdown". In any event, you'll be able to test your ANSI screens
- by using the DOS TYPE command, with ANSI.SYS (or equivalent) loaded.
-
- Ok, here goes......
-
- ====================ANSI GRAPHICS DISPLAY TO REMOTE=============================
-
- #1. In the file "common.pas" on around line # 188 add this:
-
- Graphics: Boolean;
-
-
- #2. In "part2.pas" overlay function getuser add these lines at the end
- of the function around line #80:
-
- nl; prompt('Graphics [y/N]?');
- if yn then Graphics:=true else Graphics:=false;
-
- #3. In "bbs.pas" replace the procedure "mainmenu" with the following:
-
- procedure mainmenu;
- var nb,inte:integer; abort,next:boolean; ii:str; rl:real; mr:mailrec;
- begin
- dump;tleft;nl; macok:=true;
- if not expert then if Graphics then printfile('gfiles\mainmenu.msg')
- else printfile('gfiles\mainmenu');
- print('Time - '+tlef);
- if boards[board].key=' ' then i:='['+cstr(board)+'] ' else
- i:='['+boards[board].key+'] ';
- i:=i+'['+boards[board].name+'] :';
- prompt(i); helpl:='@';
- if onekey in thisuser.defaults then mmkey(i) else input(i,20);
- helpl:=#0;
- if length(i)=1 then case i[1] of
- '?':if expert then
- begin
- nl;
- if Graphics then printfile('gfiles\mainmenu.msg')
- else printfile('gfiles\mainmenu');
- end;
- 'O':begin
- helpl:='O';nl;prompt('Hangup? Sure? ');
- if yn then begin
- cls;
- printfile('gfiles\logoff.msg');
- hangup:=true;
- hungup:=false;
- end;
- end;
- '*':boardlist;
- 'X':expert:=not expert;
- 'D':default;
- 'Y':yourinfo;
- 'I':begin printfile('gfiles\logon.msg'); printfile('gfiles\system.msg'); end;
- 'C':reqchat;
- '$':chpw;
- 'R':removem;
- 'U':ulist;
- 'E':smail(false);
- 'F':begin irt:='Feedback'; imail(1); end;
- 'S':scan1;
- 'P':post;
- 'T':dloads;
- 'M':readmail;
- 'Q':qscan(next,true);
- 'G':gfiles;
- 'N':nscan;
- 'W':wamsg;
- 'V':vote;
- 'L':printfile('gfiles\user.log');
- 'A':abbs;
- 'H':mmacro;
- 'K':delmail;
- 'J':prg(false);
- 'Z':prg(true);
- 'B':printfile('gfiles\bbslist.msg');
- '!':if cs then begin
- print('Enter name or number of person.'); prompt(':');
- finduser(inte); if inte>0 then vali(inte);
- end;
- end else
- begin
- if copy(i,1,2)='//' then i:=copy(i,3,length(i)-2);
- if i='/O' then hangup:=true;
- if i='/E' then smail(true);
- if i='/K' then if onekey in thisuser.defaults then thisuser.defaults:=
- thisuser.defaults-[onekey] else
- thisuser.defaults:=thisuser.defaults+[onekey];
- if (i='UEDIT') and cs then uedit(usernum);
- if (i='STATUS') and cs THEN PSTAT;
- if (i='IVOTES') AND cs then initvotes;
- if (i='LOG') and cs then printfile('gfiles\sysop.log');
- if (i='YLOG') and cs then printfile('gfiles\ysysop.log');
- if (i='BOARDEDIT') and so then boardedit;
- if (i='DLBOARDEDIT') and so then dlboardedit;
- if (i='MAILR') and so then mailr;
- if (i='TEDIT') and cs then begin ret:=200; dos('E'); end;
- if (i='/?') and cs then printfile('gfiles\sysopmnu.msg');
- if (i='QUIT') and so then begin doneday:=true; hangup:=true; elevel:=1; end;
- if (i='DOS') and cs then begin ret:=200; dos('D'); end;
- if (i='VER') then pver;
- if (i='OLDUSERS') and cs then oldusers;
- end;
- nb:=value(i);
- if nb>0 then
- if nb<=numboards then
- if (boards[nb].key=' ') and boardacpw(nb) then board:=nb
- else
- else
- else begin
- nb:=0;
- for inte:=1 to numboards do if boards[inte].key=i then nb:=inte;
- if (nb<>0) and (i<>' ') then if boardacpw(nb) then board:=nb;
- end;
- end;
-
-
-
- #5. In the file "dloads.pas" replace the procedure "ftmainmenu" with:
-
- procedure ftmainmenu;
- var ii,i:str; int:integer;
- begin
- dump; tleft; nl;
- if not expert then if Graphics then printfile('gfiles\dlmenu.msg')
- else printfile('gfiles\dlmenu');
- print('Time - '+tlef);
- i:='('+cstr(culb)+')-('+uboards[culb].name+') :';
- prompt(i);
- helpl:='T';
- mmkey(i);
- helpl:=#0;
- if length(i)=1 then case i[1] of
- '?':if expert then if Graphics then printfile('gfiles\dlmenu.msg')
- else printfile('gfiles\dlmenu');
- 'Q':doneft:=true;
- 'B':browsefiles;
- 'U':iul;
- 'D':idl;
- 'L':listfiles;
- 'S':search;
- 'F':searchd;
- 'C':reqchat;
- 'O':begin
- nl;nl;prompt('Hangup? Sure? '); helpl:='O';
- if yn then begin
- cls;
- printfile('gfiles\logoff.msg');
- hangup:=true;
- hungup:=false;
- end;
- end;
- '*':listboards;
- 'P':pointdate;
- 'N':nf;
- 'R':remove;
- 'M':if cs then move;
- 'V':lfii;
- 'Y':yourinfo;
- 'X':expert:=not expert;
- end;
- if i='/O' then hangup:=true;
- if (i='SORT') and cs then sort;
- if (i='REN') and cs then ren;
- if (i='0') and cs then culb:=0;
- int:=value(i); if (int>0) and (int<=maxulb) then
- if thisuser.dsl>=uboards[int].dsl then
- if (uboards[int].password='') or cs then culb:=int else begin
- prompt('Password? '); input(i,10);
- if i<>uboards[int].password then
- print('Wrong.')
- else
- culb:=int;
- end;
- end;
-
-
- #6. Now compile all the files "bbs.pas", "dloads.pas", and "dos.pas".
- That should do it. The new procedure "ftmainmenu" also adds a toggle
- for expert on/off. It also will display the file menu for those who
- have expert set to off when they enter the file area. For the file
- names of the graphic files I've used the same name, without an
- extension. You may name them anything you choose though. Let me know
- if you have any trouble installing the changes.
-
-
- #7. Please note that the graphics files have the same name, but no extension.
- You may change the names to anything you wish.
-
- ==========================END OF GRAPHICS ADDITION===========================
-
-
- Disabling the "Ctrl-C" function from remote
- Author: Dennis Raney
- ---------------------
-
- To disable the spinning cursor when a user presses "Ctrl-C", you can replace
- the routine SKEY in the file COMMON.PAS. By commenting it out, you will not
- have users freaking every time they attempt to break out of a scroll with the
- WRONG key! Users will still have the option of setting the spinning cursor
- by using the D)efaults command.
-
- =====================DEFEATING THE CONTROL-C FUNCTION=========================
- procedure skey;
- var b:boolean;
- begin
- case ord(c) of
-
- (*
- 3:if spcsr in thisuser.defaults then
- thisuser.defaults:=thisuser.defaults-[spcsr] else
- thisuser.defaults:=thisuser.defaults+[spcsr];
- *)
-
- 26:phelp;
- 20:ptime;
-
- ...the remainder of the procedure is unaltered.....
-
- =====================END SPINNING CURSOR DE-INSTALL=========================
-
- Changing the maximum age of a posted message
- Author: Mark Pinkstone
- -----------------------
-
- One of the niceties of WWIV is that many of the functions are "time-driven"
- ones, eliminating a number of unpleasant housekeeping chores if properly
- understood and used. My favorite (now) is the 'maxage' function, allowing
- your users to post messages that will expire in a predetermined number of
- days. In my opinion, the original program was far too generous with the
- expiration limit, so I changed it (even for the SysOp!!). The function
- is shown in its entirety below, with the changes marked by vertical bars
- (|) in the left margin. The original function can be found in BBS.PAS.
-
- ==================CHANGING THE MAXAGE OF A POSTED MESSAGE===================
-
- function maxage(x:integer):integer;
- begin
- | maxage:=60;
- | if x<20 then
- | maxage:=5
- | else if x<30 then
- | maxage:=10
- | else if x<50 then
- | maxage:=20
- | else if x<99 then
- | maxage:=30;
- end;
-
- ==========================END OF MAXAGE CHANGE===============================
-
- Changing the Main Menu Display/Prompt
- Author: Mark Pinkstone
- -----------------------
-
- Like many other WWIV SysOps, I found the Main Menu to be cryptic and
- cumbersome, especially to users who were listed as "non-expert',
- where a 24 line menu was displayed each time they pressed a key.
- My change to this isn't unique, by any means - I just made EVERYONE
- an "expert", and changed the prompt to show not only time remaining
- and current place in the BBS, but also how to get help, or a display of
- the main menu. The changes need to be implemented in two places, the
- main menu procedure in BBS.PAS, and the ftmainmenu procedure in DLOADS.PAS.
- Here's how....
-
- ===========================INSTANT EXPERT MODE==============================
-
- #1 (FROM BBS.PAS) - the replacements made to the procedure 'mainmenu' are
- marked with vertical bars (|) - the entire procedure IS NOT listed here
- in the interest of brevity - after all, this change is minor}
-
-
- procedure mainmenu;
- var nb,inte:integer; abort,next:boolean; ii:str; rl:real; mr:mailrec;
- begin
- dump;tleft;nl; macok:=true;
- | print('Time Remaining - '+tlef);
- | print('?=Menu, ^Z=Help');
- | { 'X':expert:=not expert; this function removed, no longer necessary}
-
- ...remainder of the procedure is unaltered for this modification...
-
- #2 (FROM DLOADS.PAS)
-
- procedure ftmainmenu;
- var ii,i:str; int:integer;
- begin
- dump; tleft; nl; nl;
- | print('Time Remaining - '+tlef);
- | print('?=Menu, ^Z=Help');
- i:='('+cstr(culb)+')-('+uboards[culb].name+') :';
- prompt(i);
-
- ...remainder of the procedure is unaltered for this modification...
-
- ====================END OF INSTANT EXPERT MODE==============================
-
-
- Eliminating High Intensity Local Text Displays
- Author: Richard Douglas
- ------------------------
- Probably the most significant one-line change in the whole system is this
- one -- to get rid of the blasted high-intensity Turbo text default on the
- local screen. Those of us who multi-task our systems pay homage to you,
- Richard!!!! The modification is indicated with a vertical bar (|), and
- is made in the last portion of the mainmenu procedure, near the end of
- the file BBS.PAS.
-
- ==========================EASY ON THE EYEBALLS========================
- begin
- | TextColor(7);
- getdir(0,i); ovrpath(i);
- if ret>127 then begin
- iport;
- if ret=200 then
- goto reent;
- if ret=201 then
- goto reent1;
- end;
-
- {...the remainder of the procedure is unchanged...}
-
- ========================END OF EASY ON THE EYEBALLS=====================
-
-
- Eliminating E-Mail Options while in Q-Scan or N-Scan
- Author: Mark Pinkstone
- -----------------------
-
- A great deal of misunderstanding (on the part of users) has been demonstrated
- by their use of the Auto-reply function while reading messages posted on
- the public boards. It is generally their assumption that they are posting
- a message by using the "A" function, rather than sending a private E-Mail
- message to the author. In order to eliminate the confusion, I have removed
- the Auto-reply option from the scan function. If someone wants to leave
- E-Mail, they may still do so from the main menu prompt.
-
- The modification is made to the procedure 'scan2' from BBS.PAS. Changes to
- the procecure are marked with a vertical bar (|).
-
- =================REMOVE AUTO-REPLY FROM SCAN FUNCTIONS======================
-
- procedure scan2(pl:integer; var cn:integer; iread:newtyp; var quit:boolean);
- var unvali,uv,pq,donescan,abort,next:boolean; i:str; t:integer;
- b:messagerec;
- begin
- quit:=false;pq:=false; unvali:=false; helpl:='S';
- donescan:=false;
- repeat
- if iread=lt then begin cn:=cn+1; titles(cn,pl); iread:=rp; end;
- if iread=rp then begin
- | tleft; prompt('Read:(1-'+cstr(pl)+',^'+cstr(cn)+'),T,R,Q,P,? :');
- | {note that the "A" option has been removed from the user display}
- input(i,4); t:=value(i);
- if i='R' then begin t:=cn; i:=cstr(t); end;
- if (i<>'') and (t=0) then case i[1] of
- 'P':begin close(mf);post; iscan(pl); end;
- 'T':iread:=lt;
- 'Q':begin quit:=true; donescan:=true; end;
- 'B':donescan:=true;
- 'D':if lcs and (cn>0) and (cn<=pl) then begin
- deletem(pl,cn); cn:=cn-1;
- end;
- | {'A':autoreply;}
- 'V':if cs then vallastuser;
- 'M':if cs then movemsg(pl,cn);
- '?':begin
- print('Read:number');
- print('<CR>=next message');
- print('T)itles Q)uit');
- | print('P)ost a reply or new message on current board');
- print('R)e-read B)oard change in N-Scan');
- end;
-
- ======================END OF REMOVE AUTO-REPLY==============================
-
-
- The "Abort and Pause" Reminder (an RBBS-PC 'Throwback')
- Author: Mark Pinkstone
- -----------------------
-
- This modification is more 'nostalgia' from my RBBS-PC days than anything else,
- but it does provide some useful information to users. During the display of
- any potentially LONG text file in RBBS-PC (Bulletins, f'rinstance), the
- program was kind enough to let you know at the beginning of the display that
- "Ctrl-X aborts, Ctrl-S suspends" what you're doing. There were two ways to
- go about this WWIV modification -- either add that text to EVERY bulletin on
- the system, or change the code. Since my bulletins rotate very frequently, it
- made more sense to have WWIV display the message rather than editing every
- text file available! A new, three-line procedure, 'cxcs' was created in
- COMMON.PAS, and then invoked in several other places, as you'll see below.
-
- =========================THE RBBS-PC THROWBACK=============================
-
- #1 The following new procedure was included in COMMON.PAS. It is marked with
- vertical bars (|), and shown in context with other existing procedures both
- before and after it.
-
- procedure nl;
- begin
- prompt(chr(13)+chr(10))
- end;
-
- | procedure cxcs;
- | begin
- | nl;
- | print('[ Ctrl-X aborts, Ctrl-S suspends ]');
- | end;
-
- procedure tleft;
- var x,y:integer;
- begin
- if okt then begin
- x:=wherex; y:=wherey; window(1,1,80,4);
- gotoxy(72,3);if chatcall then begin
-
-
- #2 The procedure is called several times during 'mainmenu' in
- BBS.PAS - each time at a point where a potentially lengthy file
- might be displayed. Once again, vertical bars in the left margin
- indicate the changes or additions:
-
- procedure mainmenu;
- var nb,inte:integer; abort,next:boolean; ii:str; rl:real; mr:mailrec;
- begin
- dump;tleft;nl; macok:=true;
- print('Time Remaining - '+tlef);
- print('?=Menu, ^Z=Help');
- if boards[board].key=' ' then i:='['+cstr(board)+'] ' else
- i:='['+boards[board].key+'] ';
- i:=i+'['+boards[board].name+'] :';
- prompt(i); helpl:='@';
- if onekey in thisuser.defaults then mmkey(i) else input(i,20);
- helpl:=#0;
- if length(i)=1 then case i[1] of
- '?':begin nl; if graphics then printfile('gfiles\mainmenu.msg')
- else printfile('gfiles\mainmenu');
- end;
- 'O':begin
- helpl:='O';nl;nl;prompt('Hangup? Are you sure? ');
- if yn then begin
- cls;
- printfile('gfiles\logoff.msg');
- hangup:=true;
- hungup:=false;
- end;
- end;
- '*':boardlist;
- { 'X':expert:=not expert;}
- 'D':default;
- 'Y':yourinfo;
- | 'I':begin cxcs; printfile('gfiles\logon.msg'); nl; printfile('gfiles\system.msg'); end;
- | {procedure cxcs added to COMMON.PAS}
- 'C':reqchat;
- '$':chpw;
- 'R':removem;
- | 'U':begin cxcs; ulist; end;
- 'E':smail(false);
- 'F':begin irt:='Feedback'; imail(1); end;
- 'S':scan1;
- 'P':post;
- 'T':dloads;
- 'M':readmail;
- 'Q':qscan(next,true);
- 'G':gfiles;
- 'N':nscan;
- 'W':wamsg;
- 'V':vote;
- | 'L':begin cxcs; printfile('gfiles\user.log'); end; { cxcs added in COMMON }
- 'A':abbs;
- 'H':mmacro;
- 'K':delmail;
- 'J':prg(false);
- 'Z':prg(true);
- | 'B':begin cxcs; printfile('gfiles\bbslist.msg'); end; {cxcs added to COMMON.PAS}
- '!':if cs then begin
- print('Enter name or number of person.'); prompt(':');
- finduser(inte); if inte>0 then vali(inte);
- end;
-
-
- #3 The procedure is called in PART2.PAS for the display of Gfiles:
-
- procedure lgft;
- var abort,next:boolean; c:integer;
- begin
- nl; print(titl); nl;
- if numgft=0 then print('No G-files.') else begin
- abort:=false; next:=false; c:=1;
- while (c<=numgft) and (not abort) do begin
- printacr(cstr(c)+': '+gftit[c].tit,abort,next);
- c:=c+1;
- end;
- end;
- end;
-
- begin
- nl;assign(f,'gfiles\gfiles.dat'); {$I-} reset(f); {$I+}
- if ioresult<>0 then begin
- rewrite(f); b.num:=0; write(f,b);
- end;
- seek(f,0); read(f,b); t:=b.num; helpl:='G';
- if t=0 then print('No G-files yet.') else begin
- gettit(0); exit:=false;
- lgft; lgftn:=0; deep:=false; lgftnt:=0;
- repeat
- nl; nl; prompt('Gfiles: (1-'+cstr(numgft)+', ^'+cstr(lgftn)+'),?,Q : ');
- input(i,3);
- if i='' then if lgftn=numgft then i:='Q' else i:=cstr(lgftn+1);
- if i='?' then lgft;
- if i='Q' then
- if deep then begin
- deep:=false;
- gettit(0);
- lgft;
- lgftn:=lgftnt;
- end else exit:=true;
- c:=value(i);
- if (c>0) and (c<=numgft) then begin
- if gftit[c].gfile=true then begin
- seek(f,gftit[c].arn);
- read(f,b);
- | cxcs;
- printfile('gfiles\'+b.filen);
-
- ...the remainder of the procedure is unchanged....
-
- =====================END OF THE RBBS-PC THROWBACK==========================
-
-
- "Multi-Mod" to the Upload Procedures
- Author: Mark Pinkstone
- -----------------------
-
- This series of small modifications accomplishes several things...
-
- 1. It eliminates any guesswork on the users' parts as to what constitutes
- a 60 character file description by providing a graphic "ruler bar" above
- the prompt line for the file description;
-
- 2. It allows more legal DOS filename characters, by changing the array
- of acceptable text characters for file names;
-
- 3. It shows (to the nearest 999 bytes), the available free space on the
- upload drive BEFORE the user uploads a file (integer limitations and
- remaining .COM file size constraints, coupled with a basically lazy
- programmer, resulted in a rounded number of available bytes free - but
- boy, is it FAST!);
-
- 4. Forces ALL new uploads (for users with a SL of less than 100) into the
- hidden directory, #0(Sysop). A recent rash of pirated software uploads
- convinced me of its necessity. WWIV makes moving files easy enough, so
- why not? In homage to GEnie, the message "File will remain in SysOp's
- area until reviewed" is presented to the uploader BEFORE the file is
- received;
-
- 5. Performs some other general houskeeping and user-friendliness chores.
-
- These changes are made only to the procedure dlx1 from the file DLOADS.PAS,
- and are indicated by vertical bars (|) in the left margin. Comments have
- been added where appropriate.
-
- ===========================UPLOAD MULTI-MODS================================
-
- procedure dlx(f1:ulfrec; var abort:boolean);
- var inte,pl,c:integer; ok,tl:boolean; u:userrec; rl:real; i,ii:str;
- begin
- nl; nl;
- print('Filename: "'+align(f1.filename)+'"');
- print('Desc. : '+f1.description);
- print('# blocks: '+cstr(f1.blocks)+'-Xmodem, '+cstr((f1.blocks+7)div 8)+'-Ymodem');
- procedure ul(fn:str);
- var x,pl,c,cc,ob,np:integer; f,f1:ulfrec; uls,ok:boolean; fi:file of byte;
- | var fx,fds:str;
- begin
- if freek>80 then begin
-
- | str(freek,fx); {prepares freek for use as text}
- | fds:=fx; { " " " }
-
- uls:=incom;
- ob:=culb;
- ok:=true; fn:=align(fn);
- if (fn[1]=' ') or (fn[10]=' ') then ok:=false;
- for x:=1 to length(fn) do
-
- | if not (fn[x] in ['0'..'9','A'..'Z','.','-','_',' ']) then ok:=false;
- | {adds some more legal ascii filename characters to the array}
-
- np:=0; for x:=1 to length(fn) do if fn[x]='.' then np:=np+1;
- if np<>1 then ok:=false;
- if ok then
- if incom then
- if exist('dloads\'+fn) then
- if cs then begin
- print('There already is one.');
- prompt('Do it anyway? ');
- ok:=yn;
- uls:=false;
- end else
- ok:=false
- else
- ok:=true
- else
- ok:=exist('dloads\'+fn)
- else print('Illegal filename, or file already exists.');
- if (not incom) then
- if ok then print('Am using the file in dloads\')
- else begin print('To put in a file from keyboard, it must already be');
- print('present in the dloads\ directory.'); end;
- nl; nl;
- if ok and incom and uls then begin
- assign(fi,'dloads\'+fn); {$I-} rewrite(fi); {$I+}
- if ioresult<>0 then begin
- {$I-} close(fi); {$I+} cc:=ioresult;
- ok:=false;
- end else begin close(fi); erase(fi); end;
- end;
- if not ok then print('Can''t use that filename, sorry.') else begin
- iscan(pl);
- if pl>=uboards[culb].maxfiles then print('This board is full.') else begin
-
- | print('Drive has '+fds+'000 bytes available for storage.');
- | {displays the available space on the upload drive - nearest thousand}
-
- prompt('Upload "'+fn+'" ? ');
- if yn then begin ok:=true; close(ulff);
-
- | nl; print('|-----Please supply file description. 60 character max-----|.'); prompt(':');
- | {provides visual template for the 60 character file description}
-
- inputl(f.description,60);
-
- | if (f.description[1]='\') or (thisuser.sl<99) then begin
- | culb:=0;
- | print('File will remain in Sysop`s Area until reviewed');
- | end;
- | {forces all users' uploads into #0 unless co-sysop access level granted}
-
- if f.description[1]='\' then f.description:=copy(f.description,2,80);
- iscan(pl);
- procedure gfn(var fn:str);
- begin
- nl; helpl:='L';
-
- | prompt('File mask [Return for ALL files] : '); input(fn,12);
- | {general explanation of what the list files function does}
-
- if fn='' then fn:='*.*';
- fn:=align(fn);
- end;
-
- procedure remove;
- var pl,c,rn:integer; f:ulfrec; fn:str; ff:file; u:userrec; tf:boolean;
- begin
- print('Enter filename to remove.'); prompt(': ');
- input(fn,12);
- if fn<>'' then begin
- recno(fn,pl,rn);
- if rn<>0 then begin
- seek(ulff,rn); read(ulff,f);
- if (usernum=f.owner) or cs then begin
- print('Filename: "'+f.filename+'"');
- print('Desc. : '+f.description);
- print('# blocks: '+cstr(f.blocks));
- reset(uf); seek(uf,f.owner); read(uf,u); close(uf);
- print('U/L by : '+u.name+' #'+cstr(f.owner));
- print('U/L on : '+f.date);
- prompt('Delete this? ');
- if yn then begin
- delete(rn,pl);
- if cs then begin
- prompt('Erase file too? ');
- tf:=yn;
- end else tf:=true;
- if tf then begin
- assign(ff,'dloads\'+fn);
- {$I-} erase(ff); {$I+}
- c:=ioresult;
- end;
- end;
-
- | end else print('You do not own this file!');
- | {tells user why Remove failed, rather than just returning prompt}
-
- end;
- close(ulff);
- end;
- nl; nl;
- end;
-
- ===========================END OF UPLOAD MULTI-MODS=======================
-
-